﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LoaiLinhKien_List.ascx.cs" Inherits="cbmobile.UserControl.LoaiLinhKien_List" %>
<%@ Register Assembly="PQT.Controls" Namespace="PQT.Controls" TagPrefix="pqt" %>

<script language="JAVASCRIPT" type="text/javascript">
    function verify() {
        msg = "Bạn chắc chắn muốn xóa thông tin này không?";
        return confirm(msg);
    } 
</script>

<div class="sb-box">
    <div class="header">
        <h3>Danh sách Loại linh kiện điện thoại</h3>
        <a href="/RenderMain.aspx?muid=LoaiLinhKien_Entry&action=addnew"
            class="button small">
            <span>Insert</span>
        </a>
    </div>
    <div class=" clear"></div>
    <div class="bcont">
        <div class="search_box" align="center">
            <table cellpadding="0" cellspacing="0">
                <tr class="trLabelFilter1">
                    <td>
                       Tên
                    </td>
                    <td>
                        <asp:TextBox ID="txtSearch" CssClass="inputtext" Width="100px" runat="server"></asp:TextBox>
                    </td>
                    <td>
                        <asp:LinkButton ID="btnSearch" CssClass="button small" runat="server" 
                            onclick="btnSearch_Click" >
                                            <span>Search</span>
                        </asp:LinkButton>
                    </td>
                </tr>
            </table>
        </div>
        <div class=" clear">
        </div>
        <div>
            <asp:GridView ID="gvList" runat="server" CssClass="infotable" AutoGenerateColumns="false"
                    AlternatingRowStyle-CssClass="bg" Width="100%" onrowcommand="gvList_RowCommand">
                <Columns>
                    <asp:TemplateField HeaderText="STT">
                        <ItemTemplate>
                            <%# numpage()+Container.DisplayIndex+1 %>
                        </ItemTemplate>
                        <ItemStyle Width="30px" CssClass="C" />
                    </asp:TemplateField>
                </Columns>
                <Columns>
                    <asp:TemplateField HeaderText="Mã loại linh kiện">
                        <ItemTemplate>
                            <asp:Label ID="lblName" CssClass="text002" Text='<%# Eval("Ma_LoaiLinhKien") %>' runat="server"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <Columns>
                    <asp:TemplateField HeaderText="Tên loại linh kiện">
                        <ItemTemplate>
                            <asp:Label ID="lblTenLPK" CssClass="text002" Text='<%# Eval("Ten_LoaiLinhKien") %>' runat="server"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <Columns>
                    <asp:TemplateField HeaderText="Trạng thái">
                        <ItemTemplate>
                            <asp:Label ID="lblTinhTrang" CssClass="text002" Text='<%# StatusName(Eval("TrangThai")) %>'
                                runat="server">
                            </asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <Columns>
                    <asp:TemplateField HeaderText="Thứ tự">
                        <ItemTemplate>
                            <asp:Label ID="lblThuTu" CssClass="text002" Text='<%# Eval("ThuTu") %>'
                                runat="server">
                            </asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <Columns>
                    <asp:TemplateField HeaderText="Thao tác">
                        <ItemTemplate>
                            <asp:HyperLink ID="Label6" CssClass="text002" NavigateUrl='<%# BindURLAddParam("Ma_LoaiLinhKien", Eval("Ma_LoaiLinhKien"))%>'
                                runat="server">
                                <asp:Image ID="Image1" ImageUrl="/images/ico_detail.png" runat="server" /></asp:HyperLink>
                            <asp:LinkButton ID="LinkButton1" CommandName="DeleteItem" CommandArgument='<%#Eval("Ma_LoaiLinhKien") %>'
                                OnClientClick="return verify()" runat="server">
                                <asp:Image ID="Image2" ImageUrl="/images/ico_delete.png" runat="server" />
                            </asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle Width="100px" CssClass="C" />
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </div>
    </div>
</div>